import { defineStore } from 'pinia'
import api from '@/services/api/memo'
import { useMemoStore } from '@/stores/memoStore'

export const mapInfo = defineStore('mapInfo', {
	state: () => ({
		noticeInfo: []
	}),
	actions: {
		async getNoticeInfo() {
			await useMemoStore().getUserId()
			const { data: res } = await api.getNotice(useMemoStore().id)
			this.noticeInfo = res.memoList
		}
	}
})